<template>
	<div id="bigpanel" class="panel panel-default">
		<div class="panel-body">
			<myupload
				:page="page"
				:index="index"
				:type="type"
				:position="position"
				:product_name="product_name"
				:ver="ver"
				:inno="inno"
				:column="column"
				@disabled="setdisabled"
				@afterupload="afterupload"
				ref="myupload"
			></myupload>
		</div>
	</div>
</template>


<script>
module.exports = {
	data() {
		return {
			disabled: true,
		};
	},
	props: [
		"page",
		"index",
		"type",
		"position",
		"product_name",
		"ver",
		"inno",
		"column",
	],
	emits: ["disabled", "afterupload"],
	components: {
		myupload: httpVueLoader("/upload.vue"),
	},

	methods: {
		submitUpload() {
			this.$refs.myupload.submitUpload();
		},
		setdisabled(val) {
			this.disabled = val;
			this.$emit("disabled", this.disabled);
		},
		afterupload() {
			console.log("pics中的afterupload");
			this.$emit("afterupload");
		},
	},
};
</script>

<style scoped>
#bigpanel {
	height: auto;
	min-height: 80%;
	width: 95%;
}

.el-image {
	margin: 20px;
}

.el-pagination {
	text-align: center;
}

.el-switch {
	position: absolute;
	right: 20px;
}
.el-upload__input {
	display: none;
}
</style>
